package com.wanpinghui.wphlibrary.model.base.bean;

/**
 * 功能描述
 * author:caitiangui
 * time:2017/12/13
 */

public class CacheImage {
    private final String imageUrl;

    public CacheImage(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public String getImageId() {
        if (imageUrl.contains("?")) {
            return imageUrl.substring(0, imageUrl.lastIndexOf("?"));
        } else {
            return imageUrl;
        }
    }

}
